package ch.sysventory.pcscann;

import java.util.ArrayList;

import ch.sysventory.builder.ScannPC;
import ch.sysventory.builder.ScannPCBuilder;
import ch.sysventory.domain.ComputerInformation;
import ch.sysventory.domain.InstalledSoftware;
import ch.sysventory.domain.NIC;
import ch.sysventory.domain.OSInformation;
import ch.sysventory.domain.PrinterInformation;
import ch.sysventory.domain.ProcessorInformation;
import ch.sysventory.service.PCScannMappingXML;

/**
 * Diese Klasse startet alle notwendigen Klassen um den Scanns
 * durchzuführen und die Resultate in eine XML File zu schreiben
 *  
 */
public class PCScannApplication {

	public static void genFile() throws Exception{
		
		ScannPCBuilder scannPCBuilder = new ScannPC();
		PCScannMappingXML converter = new PCScannMappingXML();
		
		ArrayList<NIC> nic = scannPCBuilder.readNIC();
		ArrayList<OSInformation> osInformation = scannPCBuilder.readOSInformation();
		ArrayList<InstalledSoftware> installedSoftware = scannPCBuilder.readInstalledSoftware();
		ArrayList<ComputerInformation> computerInformation = scannPCBuilder.readComputerIformation();
		ArrayList<PrinterInformation> printerInformation = scannPCBuilder.readPrinterInformation();
		ArrayList<ProcessorInformation> processorInformation = scannPCBuilder.readProcessorInformation();
		
		ArrayList<Object> pcResults = new ArrayList<Object>();
		
		pcResults.add(nic);
		pcResults.add(osInformation);
		pcResults.add(installedSoftware);
		pcResults.add(computerInformation);
		pcResults.add(printerInformation);
		pcResults.add(processorInformation);
		converter.objectToXML(pcResults);
	
		
	}

	public static void main(String[] args) throws Exception {
		
		genFile();
		
		
	}

	public PCScannApplication() {
	}
}

